package pl.koziolekweb.testsonline.examples.console;

import pl.koziolekweb.testsonline.examples.console.controller.Controller;
import pl.koziolekweb.testsonline.model.Test;
import pl.koziolekweb.testsonline.model.exam.Exam;
import pl.koziolekweb.testsonline.model.exam.Result;

public class ConsoleExam implements Exam {

	private String id;

	private Test test;

	private Result result;

	public ConsoleExam(String id, Test test) {
		this.id = id;
		this.test = test;
		this.result = new ConsoleResults();
	}

	public String getId() {
		return id;
	}

	public Test getTest() {
		return test;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setTest(Test test) {
		this.test = test;
	}

	public void start() {
		Controller controller = new Controller(result, test, this);
		controller.start();
	}

	public Result stop() {
		return result;
	}

}
